package com.huaxin.hxmoduleworkorder.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huaxin.hxmoduleworkorder.common.enums.MaintenanceOrderElectricianTaskStatus;
import com.huaxin.hxmoduleworkorder.common.enums.MaintenanceOrderStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Builder
public class MaintenanceOrderElectricianTaskSummaryRespDto {
    @Schema(description = "工单ID", example = "mnt_order_001")
    private String orderId;

    @Schema(description = "工单类型", example = "maintenance")
    private String orderType;

    @Schema(description = "工单标题", example = "配电箱跳闸维修")
    private String orderTitle;

    @Schema(description = "工单描述", example = "配电箱跳闸")
    private String orderDescription;

    @Schema(description = "工单整体状态", example = "assigned")
    private MaintenanceOrderStatus orderStatus;

    @Schema(description = "工单优先级", example = "high")
    private String orderPriority;

    @Schema(description = "客户ID", example = "c1001")
    private String orderCustomerId;

    @Schema(description = "客户类型", example = "customer")
    private String orderCustomerType;

    @Schema(description = "客户姓名", example = "张三")
    private String orderCustomerName;

    @Schema(description = "客户联系电话", example = "13800138000")
    private String orderContactPhone;

    @Schema(description = "客户期望上门时间（时间段）", example = "[\"2025-09-02 09:00\",\"2025-09-02 12:00\"]")
    private String orderPreferredTime;

    @Schema(description = "客户地址", example = "北京市朝阳区XX路XX号")
    private String orderAddress;

    @Schema(description = "电工任务ID", example = "mnt_order_electrician_task_001")
    private String electricianTaskId;

    @Schema(description = "负责内容描述")
    private String responsibility;

    @Schema(description = "该电工任务状态", example = "on_site")
    private MaintenanceOrderElectricianTaskStatus taskStatus;

    @Schema(description = "分配时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime assignAt;

    @Schema(description = "接单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime acceptAt;

    @Schema(description = "到场时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime onSiteAt;
}
